package chapter_5.usb;

public class UsbFactory {
    public static USB createUsb(String type){
        USB usb = null;
        if("apple".equals(type)){
            usb = new Apple();
        }else if("kingston".equals(type)){
            usb = new Kingston();
        }else{
            System.out.println("报错");
        }
        {
            int a = 1;
        }
//        System.out.println(a);
        return usb;
    }
}
